package com.njwb.day15.zqzb.ios.io6;

import com.njwb.day15.zqzb.ios.util.Util;

import java.io.*;

public class DataoutputStreamDemo {
    public static void main(String[] args) {
        DataOutputStream dataOutputStream =  null ;


        try {
            dataOutputStream = new DataOutputStream(new FileOutputStream(new File("chapter02/src/dos.txt")));

            dataOutputStream.writeInt(18);
            dataOutputStream.writeDouble(20);


        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            Util.closeResource(dataOutputStream);
        }

    }
}
